<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="header.jsp"></jsp:include>
<title></title>
</head>
<body>
<div style="border: grad 1px thin;">
<c:forEach items="${tagList}" var="tg" varStatus="stat">	
<span><input type="button" style="background-color: #E0FFFF"  onclick="checketag(this.id)" id="${tg.tagCode}" value="${tg.tagName}"  ></span>&nbsp;&nbsp;&nbsp;
</c:forEach>
</div>
</body>
<script type="text/javascript">
function checketag(inputid){
	if($("#"+inputid).css("background-color")=="rgb(255, 0, 0)"){
		$("#"+inputid).css("background-color","#E0FFFF");
	}else{
		$("#"+inputid).css("background-color","red");
	}
	
		
	
	
}

function gettags(){
	var tagsids="";
	var tags=document.getElementsByTagName("input");
	for(var i=0;i<tags.length;i++)
	{
		var tagobj=$("#"+tags[i].id);
	if(tagobj.css('background-color')=='rgb(255, 0, 0)'){
		tagsids+=tags[i].id+",";
	}
	}
	tagsids=tagsids.substring(0,tagsids.length-1);
	return tagsids;
}
</script>
</html>